home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / gfx / show / gs_src_amiga.lha / gs5.03 / zlib.mak.in < prev   
Text File  |  1997-06-26  |  5KB  |  163 lines

  1. #    Copyright (C) 1995, 1996, 1997 Aladdin Enterprises.  All rights reserved.
  2. # This file is part of Aladdin Ghostscript.
  3. # Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  4. # or distributor accepts any responsibility for the consequences of using it,
  5. # or for whether it serves any particular purpose or works at all, unless he
  6. # or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  7. # License (the "License") for full details.
  8. # Every copy of Aladdin Ghostscript must include a copy of the License,
  9. # normally in a plain ASCII text file named PUBLIC.  The License grants you
  10. # the right to copy, modify and redistribute Aladdin Ghostscript, but only
  11. # under certain conditions described in the License.  Among other things, the
  12. # License requires that the copyright notice and this notice be preserved on
  13. # all copies.
  14.  
  15. # makefile for zlib library code.
  16.  
  17. # This partial makefile compiles the zlib library for use in Ghostscript.
  18. # You can get the source code for this library from:
  19. #   ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib104.zip   (zlib 1.0.4)
  20. #        or zlib-1.0.4.tar.gz
  21. # Please see Ghostscript's `make.txt' file for instructions about how to
  22. # unpack these archives.
  23.  
  24. # Define the name of this makefile.
  25. ZLIB_MAK=zlib.mak
  26.  
  27. # ZSRCDIR is defined in the platform-specific makefile, not here,
  28. # as the directory where the zlib sources are stored.
  29. #ZSRCDIR=zlib
  30. ZSRC=$(ZSRCDIR)$(D)
  31. # We would like to define
  32. #CCCZ=$(CCC) -I$(ZSRCDIR) -Dverbose=-1
  33. # but the Watcom C compiler has strange undocumented restrictions on what can
  34. # follow a -D=, and it doesn't allow negative numbers.  Instead, we define
  35. # (in gs.mak):
  36. #CCCZ=$(CCC) -I. -I$(ZSRCDIR)
  37. # and handle the definition of verbose in a different, more awkward way.
  38.  
  39. # We keep all of the zlib code in a separate directory so as not to
  40. # inadvertently mix it up with Aladdin Enterprises' own code.
  41. ZDEP=$(AK)
  42.  
  43. # Contrary to what some portability bigots assert as fact, C compilers are
  44. # not consistent about where they start searching for #included files:
  45. # some always start by looking in the same directory as the .c file being
  46. # compiled, before using the search path specified with -I on the command
  47. # line, while others do not do this.  For this reason, we must explicitly
  48. # copy and then delete all the .c files, because they need to obtain our
  49. # modified version of zutil.h.  We must also copy all header files that
  50. # reference zutil.h directly or indirectly.
  51.  
  52. # Code common to compression and decompression.
  53.  
  54. zlibc_=zutil.$(OBJ)
  55. zlibc.dev: $(ZLIB_MAK) $(ECHOGS_XE) $(zlibc_)
  56.     $(SETMOD) zlibc $(zlibc_)
  57.  
  58. zutil.h: $(ZSRC)zutil.h $(ECHOGS_XE)
  59.     $(EXP)echogs -w zutil.h -x 23 define verbose -s - -1
  60.     $(EXP)echogs -a zutil.h -+R $(ZSRC)zutil.h
  61.  
  62. zutil.$(OBJ): $(ZSRC)zutil.c $(ZDEP) zutil.h
  63.     $(CP_) $(ZSRC)zutil.c .
  64.     $(CCCZ) zutil.c
  65.     $(RM_) zutil.c
  66.  
  67. # Encoding (compression) code.
  68.  
  69. deflate.h: $(ZSRC)deflate.h zutil.h
  70.     $(CP_) $(ZSRC)deflate.h .
  71.  
  72. zlibe.dev: $(MAKEFILE) zlibe_$(SHARE_ZLIB).dev
  73.     $(CP_) zlibe_$(SHARE_ZLIB).dev zlibe.dev
  74.  
  75. zlibe_1.dev: $(MAKEFILE) $(ZLIB_MAK) $(ECHOGS_XE)
  76.     $(SETMOD) zlibe_1 -lib $(ZLIB_NAME)
  77.  
  78. zlibe_=adler32.$(OBJ) deflate.$(OBJ) trees.$(OBJ)
  79. zlibe_0.dev: $(ZLIB_MAK) $(ECHOGS_XE) zlibc.dev $(zlibe_)
  80.     $(SETMOD) zlibe_0 $(zlibe_)
  81.     $(ADDMOD) zlibe_0 -include zlibc
  82.  
  83. adler32.$(OBJ): $(ZSRC)adler32.c $(ZDEP)
  84.     $(CP_) $(ZSRC)adler32.c .
  85.     $(CCCZ) adler32.c
  86.     $(RM_) adler32.c
  87.  
  88. deflate.$(OBJ): $(ZSRC)deflate.c $(ZDEP) deflate.h
  89.     $(CP_) $(ZSRC)deflate.c .
  90.     $(CCCZ) deflate.c
  91.     $(RM_) deflate.c
  92.  
  93. trees.$(OBJ): $(ZSRC)trees.c $(ZDEP) deflate.h
  94.     $(CP_) $(ZSRC)trees.c .
  95.     $(CCCZ) trees.c
  96.     $(RM_) trees.c
  97.  
  98. # The zlib filters per se don't need crc32, but libpng versions starting
  99. # with 0.90 do.
  100.  
  101. crc32.dev: $(MAKEFILE) crc32_$(SHARE_ZLIB).dev
  102.     $(CP_) crc32_$(SHARE_ZLIB).dev crc32.dev
  103.  
  104. crc32_1.dev: $(MAKEFILE) $(ZLIB_MAK) $(ECHOGS_XE)
  105.     $(SETMOD) crc32_1 -lib $(ZLIB_NAME)
  106.  
  107. crc32_0.dev: $(ZLIB_MAK) $(ECHOGS_XE) crc32.$(OBJ)
  108.     $(SETMOD) crc32_0 crc32.$(OBJ)
  109.  
  110. crc32.$(OBJ): $(ZSRC)crc32.c $(ZDEP) deflate.h
  111.     $(CP_) $(ZSRC)crc32.c .
  112.     $(CCCZ) crc32.c
  113.     $(RM_) crc32.c
  114.  
  115. # Decoding (decompression) code.
  116.  
  117. zlibd.dev: $(MAKEFILE) zlibd_$(SHARE_ZLIB).dev
  118.     $(CP_) zlibd_$(SHARE_ZLIB).dev zlibd.dev
  119.  
  120. zlibd_1.dev: $(MAKEFILE) $(ZLIB_MAK) $(ECHOGS_XE)
  121.     $(SETMOD) zlibd_1 -lib $(ZLIB_NAME)
  122.  
  123. zlibd1_=infblock.$(OBJ) infcodes.$(OBJ) inffast.$(OBJ)
  124. zlibd2_=inflate.$(OBJ) inftrees.$(OBJ) infutil.$(OBJ)
  125. zlibd_ = $(zlibd1_) $(zlibd2_)
  126. zlibd_0.dev: $(ZLIB_MAK) $(ECHOGS_XE) zlibc.dev $(zlibd_)
  127.     $(SETMOD) zlibd_0 $(zlibd1_)
  128.     $(ADDMOD) zlibd_0 -obj $(zlibd2_)
  129.     $(ADDMOD) zlibd_0 -include zlibc
  130.  
  131. infblock.$(OBJ): $(ZSRC)infblock.c $(ZDEP) zutil.h
  132.     $(CP_) $(ZSRC)infblock.c .
  133.     $(CCCZ) infblock.c
  134.     $(RM_) infblock.c
  135.  
  136. infcodes.$(OBJ): $(ZSRC)infcodes.c $(ZDEP) zutil.h
  137.     $(CP_) $(ZSRC)infcodes.c .
  138.     $(CCCZ) infcodes.c
  139.     $(RM_) infcodes.c
  140.  
  141. inffast.$(OBJ): $(ZSRC)inffast.c $(ZDEP) zutil.h
  142.     $(CP_) $(ZSRC)inffast.c .
  143.     $(CCCZ) inffast.c
  144.     $(RM_) inffast.c
  145.  
  146. inflate.$(OBJ): $(ZSRC)inflate.c $(ZDEP) zutil.h
  147.     $(CP_) $(ZSRC)inflate.c .
  148.     $(CCCZ) inflate.c
  149.     $(RM_) inflate.c
  150.  
  151. inftrees.$(OBJ): $(ZSRC)inftrees.c $(ZDEP) zutil.h
  152.     $(CP_) $(ZSRC)inftrees.c .
  153.     $(CCCZ) inftrees.c
  154.     $(RM_) inftrees.c
  155.  
  156. infutil.$(OBJ): $(ZSRC)infutil.c $(ZDEP) zutil.h
  157.     $(CP_) $(ZSRC)infutil.c .
  158.     $(CCCZ) infutil.c
  159.     $(RM_) infutil.c
  160.